package cn.sczhyt.modules.app.controller;

import cn.sczhyt.common.utils.PageUtils;
import cn.sczhyt.common.utils.R;
import cn.sczhyt.modules.app.annotation.Login;
import cn.sczhyt.modules.app.annotation.LoginUser;
import cn.sczhyt.modules.app.entity.UserEntity;
import cn.sczhyt.modules.szhy.entity.MeetingUserEntity;
import cn.sczhyt.modules.szhy.service.MeetingUserService;
import io.swagger.annotations.Api;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.Map;


/**
 * 会议人员表
 *
 * @author luoshijie
 * @email 1169414426@qq.com
 * @date 2020-11-25 16:45:59
 */
@Api(tags = "APP用户个人安排")
@RestController
@RequestMapping("app/meetinguser")
public class AppMeetingUserController {
    @Autowired
    private MeetingUserService meetingUserService;


    /**
     * 信息
     */
    @Login
    @RequestMapping("/info/{meetingId}")
    public R info(@LoginUser UserEntity user, @PathVariable("meetingId") String meetingId){

        String userId = user.getUserId();

        MeetingUserEntity meetingUser = meetingUserService.getByMeetingIdAndUserId(meetingId,userId);

        return R.ok().put("data", meetingUser);
    }


}
